<!doctype html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script src="../js/angular.min.js"></script>
</head>
<body>
<div ng-app="myApp">

    <div ng-controller="DemoController">

        <!--字符串参数过滤-->
        {{ ['Ari','Lerner','Likes','To','Eat','Pizza'] | filter:'e' }}<br/>

        <!--对象参数过滤-->
        {{
            [{age:19,name:'zhangsan'},{age:12,name:'lisi'}] |filter:{age:12}
        }}<br/>

        <!--自定义函数-->
        {{
        ['App','Application','app'] | filter:isCapitalized
        }}<br/>

        <!--转换成JSON字符串-->
        {{
        ['App','Application','app'] | filter:json
        }}<br/>

        <!--截取字符串-->
        {{
            'San Francisco is very cloudy' | limitTo:3
        }}<br/>
        {{
        'San Francisco is very cloudy' | limitTo:-3
        }}<br/>

        <!--lowercase 将字符串转为小写-->
        {{
         'San Francisco is very cloudy' | lowercase
        }}<br/>

        <!--number-->
        {{ 123456789 | number }}<br/>
        {{ 1.23456789 | number:2 }}<br/>

        <!--orderBy-->
        {{ [{'name':'a'},{'name':'c'},{'name':'b'},{'name':'e'},{'name':'d'}] | orderBy:'name' }}<br/>
        {{ [{'name':'a'},{'name':'c'},{'name':'b'},{'name':'e'},{'name':'d'}] | orderBy:'name':true }}<br/>

        <!--uppercase-->
        {{ "San Francisco is very cloudy" | uppercase }}<br/>
    </div>

</div>
<script type="text/javascript">

    var app = angular.module("myApp",[]);
    app.controller('DemoController',function($scope){
        $scope.isCapitalized=function(str){
              return str[0] == str[0].toUpperCase();
        }
    });




</script>
</body>
</html>